package cn.rxmind.dlog.common;

import org.springframework.context.ApplicationEvent;

/**
 *
 * @description 这里定义了日志数据可以被读取事件
 *
 * @author renxin
 * @email renxinzhiliangzhi@163.com
 * @date 2020/7/10 1:28 下午
 */
public final class DLogDataCanSendEvent extends ApplicationEvent {

    private int sendBatchCount;

    public DLogDataCanSendEvent(Object source, int sendBatchCount) {
        super(source);
        if(sendBatchCount < 1){
            throw new IllegalArgumentException("sendBatchCount can not less than one");
        }
        this.sendBatchCount = sendBatchCount;
    }

    /**
     * 获取陪配置的批量写出数量
     *
     * @return
     */
    public int getSendCount(){
        return sendBatchCount;
    }
}
